import { Navigate } from "react-router-dom";
import { lazy } from "react";
// 使用路由懒加载（lazy）
const Index = lazy(() => import("@/pages"));
const Login = lazy(() => import("@/pages/Login"));
const NotFound = lazy(() => import("@/pages/NotFound"));
import MenuList from './Menu'
const routers = [
  {
    path: "/",
    element: <Navigate to="/home" />,
  },
  {
    path: "/",
    element: <Index />,
    children: [...MenuList]
  },


  {
    path: "/login",
    element: <Login />,
  },
  {
    path: '*',
    element: <NotFound />
  },
];
export default routers;
